<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<div id="tabbedBoxSetting" class="box tabbedBox tabs" style="max-width:100%">
	<div class="header">
		<ul>
			<c:forEach items="${configs }" var="entity" varStatus="vs">
				<li class="with-icon"><a id="a_${entity.id}"
					data-index="${vs.index }" link="${entity.url }"
					href="#c_${entity.id}">${entity.name}</a>
				</li>
			</c:forEach>
		</ul>
		<h2>&nbsp;</h2>
	</div>
	<div style="padding:0" class="content tabbed">
		<c:forEach items="${configs }" var="entity">
			<div id="c_${entity.id}"></div>
		</c:forEach>
	</div>

</div>



<script type="text/javascript">
	var current = $("#tabbedBoxSetting #a_${currentConfigId}");

	var index = current.data("index");

	$("#c_${currentConfigId}").load(current.attr("link"));

	$("#tabbedBoxSetting").tabs({
		active : index,
		activate : function(event, ui) {

			var $e = $($(ui.newTab).html());
			if ($(ui.newPanel).html() == "") {
				var httpHref = $e.attr("link");
				$(ui.newPanel).load(httpHref);
			}

		}
	});
</script>
